/*
 * Copyright (c) 2011  Cristian Constantin
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package com.quizio.model;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author Cristian Constantin
 * @since 12/23/11
 */
@Entity
@Table(name = "roles")
public class Role implements Serializable {

    private Long id;
    private String name;

    @Id
    @SequenceGenerator(name = "roles_pk_sequence", sequenceName = "roles_id_seq")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "roles_pk_sequence")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "name", length = 256)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
